Skip to content

refactor(libanki): begin removing AnkiDroid dependencies from TestClass #18838

Merged
david-allison merged 3 commits intoankidroid:mainfrom
david-allison:libanki-testclass-1
Jul 11, 2025
Merged

refactor(libanki): begin removing AnkiDroid dependencies from TestClass #18838
david-allison merged 3 commits intoankidroid:mainfrom
david-allison:libanki-testclass-1

Conversation

@david-allison
Copy link
Member

I split this out from #18813 to make it an easier review

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

should be in a common 'testutils' module

but creating a module for a class seems overkill

allows 'JvmTest' to depend on 'MockTime'
fixes:

```
null cannot be cast to non-null type com.android.build.api.dsl.CommonExtension<*, *, *, *, *, *>
```

These may be useful in future, but not yet: Anki-Android-Backend is an
 Android module so we can't depend on it from pure JVM code
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking

@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jul 11, 2025
general extension method

in order to split out `TestClass` to libanki:testutils
@david-allison
Copy link
Member Author

david-allison commented Jul 11, 2025

merging - a few things are blocked behind getting libanki tests in the right place

@david-allison david-allison added this pull request to the merge queue Jul 11, 2025
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Jul 11, 2025
Merged via the queue into ankidroid:main with commit b5a4345 Jul 11, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.22 release milestone Jul 11, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Jul 11, 2025
@david-allison david-allison deleted the libanki-testclass-1 branch July 11, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants